from typing import List, Optional

from pydantic import BaseModel


class ReadAllRequest(BaseModel):
    source: str
    target: str


class CreateTeamRequest(BaseModel):
    name: str
    users: List[str]


class UpdateTeamRequest(BaseModel):
    team_name: Optional[str] = None
    users: Optional[List[str]] = None


class TeamMsgReadRequest(BaseModel):
    msg_id: int
    team_id: int
    mac_addr: str


class ExitTeamRequest(BaseModel):
    team_id: int
    mac_addr: str


class ApproveRequest(BaseModel):
    source: str
    target: str
    remark_name: Optional[str] = None


class MobileUserRequest(BaseModel):
    username: str
    password: str
    nickname: Optional[str] = None


class UpdateMobileUserRequest(BaseModel):
    unique_id: str
    nickname: str
    password: Optional[str] = None
